﻿using System;

namespace CSLive.ControlPanel.Editor
{
    /// <summary>
    /// Editor Control for rendering in the CSLive Editor.  
    /// Each Editor Control is basically the asp.net text representation of the control ready for the admin to place on the pages
    /// Editor Contol is part of the CSLive Editor 
    /// </summary>
    public sealed class Control
    {
        #region Properties

        /// <summary>
        /// Name if the Editor Control
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Description of the Editor Control
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// Template of the Control
        /// </summary>
        public string Template { get; set; }

        /// <summary>
        /// States if the control is required for the LiveControl to work in the editor
        /// </summary>
        public bool Required { get; set; }

        #endregion

        #region Constructor(s)

        /// <summary>
        /// Default Constructor
        /// </summary>
        public Control()
        {
            Name = "";
            Required = false;
            Template = "";
            Description = "";
        }

        /// <param name="name">Name of the Editor Control</param>
        /// <param name="description">Description of the Editor Control</param>
        /// <param name="required">Required editor control for the Live Control</param>
        /// <param name="template">Template of the Editor Control</param>
        public Control( string name, string description, bool required, string template )
        {
            Name = name;
            Description = description;
            Required = required;
            Template = template;
        }

        #endregion
    }
}